package ioc11;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/5/17 9:27
 * Version:1.0-SNAPSHOT
 * Description:
 */
public class Test02 {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("ioc11/spring2.xml");
        Student student = (Student) ac.getBean("student");
        Student student2 = (Student) ac.getBean("student2");
        Student student3 = (Student) ac.getBean("student3");
        System.out.println(student);
        System.out.println(student2);
        System.out.println(student3);
    }
}
